抱歉,您的浏览器无法访问本站
本页面需要浏览器支持(启用)JavaScript
了解详情 >

Windows系统

使用时请修改:
c_cpp_properties.jsoninclude路径
launch.jsongdb路径
tasks.jsonbin路径

c_cpp_properties.json

查看代码
/.vscode/c_cpp_properties.json
{ "configurations": [{ "name": "Win32", "includePath": [ "${workspaceFolder}/**", "C:\\MySoftware\\Environment\\C\\MinGW64_C\\include"//include路径 ], "defines": [ "_DEBUG", "UNICODE", "_UNICODE" ], "windowsSdkVersion": "10.0.18362.0", "compilerPath": "C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Tools/MSVC/14.27.29110/bin/Hostx64/x64/cl.exe", "cStandard": "c99", "cppStandard": "c++17", "intelliSenseMode": "msvc-x64" }], "version": 4 }

launch.json

查看代码
/.vscode/launch.json
{ // 使用 IntelliSense 了解相关属性。 // 悬停以查看现有属性的描述。 // 欲了解更多信息,请访问: https://go.microsoft.com/fwlink/?linkid=830387 "version": "0.2.0", "configurations": [{ "name": "C/C++/C#", "type": "cppdbg", "request": "launch", "program": "${fileDirname}\\${fileBasenameNoExtension}.exe", "args": [], "stopAtEntry": false, "cwd": "${workspaceFolder}", "environment": [], "externalConsole": false, "internalConsoleOptions": "neverOpen", "MIMode": "gdb", "miDebuggerPath": "C:\\MySoftware\\Environment\\C\\MinGW64_C\\bin\\gdb.exe",//gdb路径 "setupCommands": [{ "description": "为 gdb 启用整齐打印", "text": "-enable-pretty-printing", "ignoreFailures": true }], "preLaunchTask": "gcc.exe build active file" }, { "name": "Python3.7", "type": "python", "request": "launch", "program": "${file}", "console": "integratedTerminal" } ] }

settings.json

查看代码
/.vscode/settings.json
{ "python.formatting.provider": "autopep8", "C_Cpp.errorSquiggles": "Disabled", "liveServer.settings.port": 5501, "files.associations": { "vector": "cpp", "type_traits": "cpp", "cmath": "cpp", "limits": "cpp", "new": "cpp", "utility": "cpp", "random": "cpp", "array": "cpp", "string": "cpp", "string_view": "cpp", "bitset": "cpp", "chrono": "cpp", "algorithm": "cpp" } }

tasks.json

查看代码
/.vscode/tasks.json
{ // 有关 tasks.json 格式的文档,请参见 // https://go.microsoft.com/fwlink/?LinkId=733558 "version": "2.0.0", "tasks": [{ "type": "shell", "label": "gcc.exe build active file", "command": "gcc", "args": [ "-g", "${file}", "-o", "${fileDirname}\\${fileBasenameNoExtension}.exe", "-std=c11" ], "options": { "cwd": "C:\\MySoftware\\Environment\\C\\MinGW64_C\\bin"//bin路径 }, "problemMatcher": [ "$gcc" ], "group": "build" } ] }

评论